import BaseEndpoint from '../../Base/endpoint'
import WhereAndEQNode from './WhereAndEQNode'
import { v4 as uuidv4 } from 'uuid'

class WhereAndNOTINNode extends WhereAndEQNode {
  [x: string]: any
  constructor(opts) {
    opts.nodeType = 'WHERE_AND_NOTIN'
    opts.text = '并且不包含'

    //设置连接点
    opts.endpoints = opts.endpoints || [
      {
        id: uuidv4(),
        type: 'target',
        scope: 'run',
        dataKey: 'from',
        pointType: 'start',
        limitNum: 1,
        orientation: [-1, 0],
        pos: [0, 0.35],
        Class: BaseEndpoint
      },
      {
        id: uuidv4(),
        type: 'source',
        scope: 'run',
        dataKey: 'to',
        pointType: 'end',
        limitNum: 1,
        orientation: [1, 0],
        pos: [0, 0.35],
        Class: BaseEndpoint
      },
      {
        id: uuidv4(),
        type: 'target',
        scope: 'list',
        dataKey: 'params',
        pointType: 'input',
        orientation: [-1, 0],
        pos: [1, 0.64],
        title: '输入值（集合）',
        Class: BaseEndpoint
      },
      {
        id: uuidv4(),
        type: 'source',
        scope: 'where',
        dataKey: 'where',
        pointType: 'output',
        orientation: [1, 0],
        pos: [0, 0.64],
        title: '输出值（条件）',
        Class: BaseEndpoint
      }
    ]
    super(opts)
  }
}
export default WhereAndNOTINNode
